//
//  ChatHeadView.m
//  timelyRain
//
//  Created by Jiafei Wei on 2016/12/29.
//  Copyright © 2016年 Jiafei Wei. All rights reserved.
//

#import "ChatHeadView.h"
#import "MBTPre.h"
@interface ChatHeadView()
- (IBAction)back:(id)sender;
@property (weak, nonatomic) IBOutlet UIImageView *headpic;
@property (weak, nonatomic) IBOutlet UILabel *name;
@property (weak, nonatomic) IBOutlet UILabel *phone;
- (IBAction)call:(id)sender;
- (IBAction)callInternet:(id)sender;


@end
@implementation ChatHeadView


- (IBAction)back:(id)sender {
    if ([self.delegate respondsToSelector:@selector(backTo)]) {
        [self.delegate backTo];
    }
}
- (IBAction)call:(id)sender {
    if ([self.delegate respondsToSelector:@selector(callTo)]) {
        [self.delegate callTo];
    }
}

- (IBAction)callInternet:(id)sender {
    if ([self.delegate respondsToSelector:@selector(callInternetTo)]) {
        [self.delegate callInternetTo];
    }
}
+ (instancetype)headerView
{
    ChatHeadView *footer = [[[NSBundle mainBundle] loadNibNamed:@"ChatHeadView" owner:nil options:nil] lastObject];
    footer.frame =CGRectMake(0, 0, SCREEN_W, footer.frame.size.height);
    return footer;
}
-(void)setNameValue:(NSString *)nameValue{
    _nameValue =nameValue;
    _name.text=_nameValue;
}
-(void)setPhoneValue:(NSString *)phoneValue{
    _phoneValue =phoneValue;
    _phone.text=_phoneValue;
}
@end
